﻿<Canvas x:Class="LFSRecord2.View.ViewportStructures.CompLayerKeyFrameDrawing"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:lfsconv="clr-namespace:LFSRecord2.View.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="50" Loaded="CompLayerKeyFrameDrawing_Loaded" Unloaded="CompLayerKeyFrameDrawing_Unloaded">
    <Canvas.Resources>
        <lfsconv:KeyFrameSelectionBackgroundBrushConverter x:Key="keyFrameSelectionBackgroundBrushConverter" />
    </Canvas.Resources>
    <Line Name="BezierInConnectorLine" Stroke="White" Visibility="Hidden" IsHitTestVisible="False" />
    <Line Name="BezierOutConnectorLine" Stroke="White" Visibility="Hidden" IsHitTestVisible="False" />
    <Rectangle Name="KeyRectangle" 
               Width="6" Height="6" 
               Stroke="White" Fill="{Binding IsSelected, Converter={StaticResource keyFrameSelectionBackgroundBrushConverter}}" 
               Margin="-3,-3,0,0" 
               RenderTransformOrigin="0.5,0.5"
               MouseLeftButtonDown="KeyRectangle_MouseLeftButtonDown"
               MouseRightButtonDown="KeyRectangle_MouseRightButtonDown"/>
    <Ellipse Name="BezierHandleIn" 
             Width="5" Height="5" 
             Margin="-2.5,-2.5,0,0" 
             Stroke="White" Fill="Transparent" 
             RenderTransformOrigin="0.5,0.5"
             MouseLeftButtonDown="BezierHandleIn_MouseLeftButtonDown" />
    <Ellipse Name="BezierHandleOut" 
             Width="5" Height="5" 
             Margin="-2.5,-2.5,0,0" 
             Stroke="White" Fill="Transparent" 
             RenderTransformOrigin="0.5,0.5"
             MouseLeftButtonDown="BezierHandleOut_MouseLeftButtonDown" />
</Canvas>
